<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="css/base.css" />
<link rel="stylesheet" href="css/info-mgt.css" />
<title>移动办公自动化系统</title>
<script type="text/javascript">
	function skipPage(currentPage){
        var url='${pageContext.request.contextPath }/RecallManager.action?method=query&id=1&currPage='+currentPage;
        window.location.href=url;
      }
    function show(id){
    	var currPage=${requestScope.recallpage.currentPage};
    	var url='${pageContext.request.contextPath }/RecallManager.action?method=look&id='+id+'&currPage='+currPage;
    	
      	window.location.href=url;
    }
    function del(id){
    	var currPage=${requestScope.recallpage.currentPage};
      	 
      	 	if(window.confirm("确定删除?")){
      	 		var url="RecallManager.action?method=delete&id="+id+"&currPage="+currPage;
      	 		window.location.href=url;
      	 	}
    }
</script>
</head>

<body>
<div class="title"><h2>备忘录</h2></div>
<div class="table-operate ue-clear">
	<a href="RecallManager.action?method=now" class="add">添加</a>
</div>

	<table>
    	<thead>
        	<tr>
            	<th class="num">编号</th>
                <th class="name">用户ID</th>
                <th class="process">标题</th>
                <th class="node">正文</th>
                <th class="time">记录时间</th>
                <th class="operate">操作</th>
            </tr>
        </thead>
        <tbody>
        <c:forEach items="${requestScope.recallpage.data}" var="view" varStatus="c">
        	<tr>
            	<td class="num">${view.recallId }</td>
                <td class="name">${view.userId }</td>
                <td class="process">${view.recallTitle }</td>
                <td class="node">${view.recallContent }</td>
                <td class="time">${view.recallTime }</td>
                <td class="operate"><a href="javascript:;" onclick="show('${view.recallId}');">查看</a>&nbsp<a href="javascript:;" onclick="del('${view.recallId }');">删除</a></td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
	<table>
			<tr>
				<td>
					<a onclick=
	skipPage('1');;
>首页</a>
				</td>
				<td>
					<a
						onclick="skipPage('${requestScope.recallpage.currentPage==1?1:requestScope.recallpage.currentPage-1 }');">上一页</a>
				</td>
				<td>
					<a
						onclick="skipPage('${requestScope.recallpage.currentPage==requestScope.recallpage.totalPage?(requestScope.recallpage.currentPage):(requestScope.recallpage.currentPage+1) }');">下一页</a>
				</td>
				<td>
					<a onclick="skipPage('${requestScope.recallpage.totalPage}');">末页</a>
				</td>
				<td>
					当前页码：${requestScope.recallpage.currentPage
					}/${requestScope.recallpage.totalPage}
				</td>
			</tr>
		</table>
</body>
</html>


